// zh_tcwq/pages/task/task.js
var app = getApp(), util = require("../../utils/util.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  qd: function () {
    wx.navigateTo({
      url: "../qd/qd"
    });
  },
  liulan: function () {
    wx.navigateTo({
      url: '../miaosha/miaosha',
    });
  },
  fabu: function () {
    wx.navigateTo({
      url: "../fabu/edit/edit?id=undefined&type_id=4&money=0.00,0.00&type2_id=0&sb_type=0"
    });
  },
  common: function () {
    wx.navigateTo({
      url: "../fabu/edit/edit?id=undefined&type_id=5&money=0.00,0.00&type2_id=0&sb_type=0"
    });
  },
  zhenfu: function () {
    wx.navigateTo({
      url: "../fabu/edit/edit?id=undefined&type_id=6&money=0.00,0.00&type2_id=0&sb_type=0"
    });
  },
  zhuanfa: function () {
    wx.navigateTo({
      url: "../share/share"
    });
  },
  fenxiang: function () {
    wx.navigateTo({
      url: "../miaosha/miaosha"
    });
  },
  shop: function () {
    wx.navigateTo({
      url: "../miaosha/miaosha"
    });
  },
  jiaru: function (t) {
    var e = wx.getStorageSync("users").id;
    app.util.request({
      url: "entry/wxapp/MyDistribution",
      cachetime: "0",
      data: {
        user_id: e
      },
      success: function (t) {
        console.log(t.data), "2" == t.data.state ? (console.log("是加盟商"), wx.navigateTo({
          url: "../distribution/yaoqing"
        })) : "1" == t.data.state ? wx.showModal({
          title: "提示",
          content: "您的申请正在审核中，请耐心等待"
        }) : wx.navigateTo({
          url: "../distribution/jrhhr"
        });
      }
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})